

<body background="https://down.556z.com/upload/2020/11/202011171605591809877206.jpg">
<form [formGroup]="myForm">
    <h3 class="d-flex justify-content-center">用户登录(登录成功才能操作)</h3>
    <div class="form-group">
        <label for="id">学号(自动编排无法自行添加)</label>
        <input type="text" class="form-control" id="id" name="id" formControlName="id">
    </div>
    <div class="form-group">
        <label for="userName">用户名</label>
        <input type="text" class="form-control" id="userName" name="userName" formControlName="userName">
    </div>
    <div class="form-group">
        <label for="password">密码</label>
        <input type="password" class="form-control" id="password" name="password" formControlName="password">
    </div>
</form>
<div>
    <button type="button" class="btn btn-primary" (click)="search()">查询</button>
    <button type="button" class="btn btn-success" (click)="add()">添加</button>
    <button type="button" class="btn btn-danger" (click)="delete()">删除</button>
    <button type="button" class="btn btn-warning" (click)="update()">修改</button>
    <button type="button" class="btn btn-link" (click)="login()">登录</button>
</div>
<table class="table  table-striped">
    <thead>
        <tr>
            <th scope="col">#</th>
            <th scope="col">学号</th>
            <th scope="col">姓名</th>
            <th scope="col">密码</th>
        </tr>
    </thead>
    <tbody *ngFor='let p of user;let i = index;'>
        <tr *ngIf="zf[i].f">
            <th scope="row">{{i+1}}</th>
            <td>{{p.id}}</td>
            <td>{{p.name}}</td>
            <td>{{p.password}}</td>
        </tr>
    </tbody>
</table>
</body>